package com.hwpt.hwaccount.core.data.local.entity;

import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

import java.time.LocalDate;

/**
 * 描述：用户实体类
 * 作者：Mr.高
 * 日期：2025/8/20
 */
@Entity(tableName = "users")
public class UserEntity {
    /**
     * 用户唯一标识符
     * <p>使用Room主键注解，强制非空约束</p>
     */

    @PrimaryKey
    @NonNull
    //用户唯一标识符id
    private String hanWangId;
    //用户昵称
    private String nickname;
    //头像URL地址
    private String avatarUrl;
    //绑定的手机号
    private String phone;
    //绑定的邮箱
    private String email;
    //性别
    private Integer gender;
    //生日
    private String birthday;
    //国家和地区
    private String countryRegion;
    //实名认证身份证号
    private String idCard;
    //实名认证真实姓名
    private String realName;
    //紧急联系人手机号
    private String contactMobile;
    //紧急联系人姓名
    private String contactName;
    //紧急联系人关系
    private String relationship;
    //JWT访问令牌
    private String token;


    public UserEntity() {
    }

    public UserEntity(String hanWangId, String nickname, String avatarUrl, String phone, String email, Integer gender, String birthday, String countryRegion, String idCard, String realName, String contactMobile, String contactName, String relationship, String token) {
        this.hanWangId = hanWangId;
        this.nickname = nickname;
        this.avatarUrl = avatarUrl;
        this.phone = phone;
        this.email = email;
        this.gender = gender;
        this.birthday = birthday;
        this.countryRegion = countryRegion;
        this.idCard = idCard;
        this.realName = realName;
        this.contactMobile = contactMobile;
        this.contactName = contactName;
        this.relationship = relationship;
        this.token = token;
    }

    /**
     * 获取
     * @return hanWangId
     */
    public String getHanWangId() {
        return hanWangId;
    }

    /**
     * 设置
     * @param hanWangId
     */
    public void setHanWangId(String hanWangId) {
        this.hanWangId = hanWangId;
    }

    /**
     * 获取
     * @return nickname
     */
    public String getNickname() {
        return nickname;
    }

    /**
     * 设置
     * @param nickname
     */
    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    /**
     * 获取
     * @return avatarUrl
     */
    public String getAvatarUrl() {
        return avatarUrl;
    }

    /**
     * 设置
     * @param avatarUrl
     */
    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    /**
     * 获取
     * @return phone
     */
    public String getPhone() {
        return phone;
    }

    /**
     * 设置
     * @param phone
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * 获取
     * @return email
     */
    public String getEmail() {
        return email;
    }

    /**
     * 设置
     * @param email
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * 获取
     * @return gender
     */
    public Integer getGender() {
        return gender;
    }

    /**
     * 设置
     * @param gender
     */
    public void setGender(Integer gender) {
        this.gender = gender;
    }

    /**
     * 获取
     * @return birthday
     */
    public String getBirthday() {
        return birthday;
    }

    /**
     * 设置
     * @param birthday
     */
    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    /**
     * 获取
     * @return countryRegion
     */
    public String getCountryRegion() {
        return countryRegion;
    }

    /**
     * 设置
     * @param countryRegion
     */
    public void setCountryRegion(String countryRegion) {
        this.countryRegion = countryRegion;
    }

    /**
     * 获取
     * @return idCard
     */
    public String getIdCard() {
        return idCard;
    }

    /**
     * 设置
     * @param idCard
     */
    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    /**
     * 获取
     * @return realName
     */
    public String getRealName() {
        return realName;
    }

    /**
     * 设置
     * @param realName
     */
    public void setRealName(String realName) {
        this.realName = realName;
    }

    /**
     * 获取
     * @return contactMobile
     */
    public String getContactMobile() {
        return contactMobile;
    }

    /**
     * 设置
     * @param contactMobile
     */
    public void setContactMobile(String contactMobile) {
        this.contactMobile = contactMobile;
    }

    /**
     * 获取
     * @return contactName
     */
    public String getContactName() {
        return contactName;
    }

    /**
     * 设置
     * @param contactName
     */
    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    /**
     * 获取
     * @return relationship
     */
    public String getRelationship() {
        return relationship;
    }

    /**
     * 设置
     * @param relationship
     */
    public void setRelationship(String relationship) {
        this.relationship = relationship;
    }

    /**
     * 获取
     * @return token
     */
    public String getToken() {
        return token;
    }

    /**
     * 设置
     * @param token
     */
    public void setToken(String token) {
        this.token = token;
    }

    public String toString() {
        return "UserEntity{hanWangId = " + hanWangId + ", nickname = " + nickname + ", avatarUrl = " + avatarUrl + ", phone = " + phone + ", email = " + email + ", gender = " + gender + ", birthday = " + birthday + ", countryRegion = " + countryRegion + ", idCard = " + idCard + ", realName = " + realName + ", contactMobile = " + contactMobile + ", contactName = " + contactName + ", relationship = " + relationship + ", token = " + token + "}";
    }
}
